home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / games2 / rotise12.zip / BB_PDB.H < prev    next >
C/C++ Source or Header  |  1992-04-03  |  3KB  |  106 lines

  1. /* bb_pdb.h -- Definitions for interfacing to player database
  2.  
  3.     M. Mallett    April 1990
  4.  
  5. */
  6.  
  7. #ifndef    H_BB_PDB            /* Allow multiple inclusions */
  8. #define    H_BB_PDB
  9.  
  10.     /* Bits representing positions */
  11. #define    POS_P        0x0001        /* Pitcher */
  12. #define    POS_C        0x0002        /* Catcher */
  13. #define    POS_1B        0x0004        /* First */
  14. #define    POS_2B        0x0008        /* Second */
  15. #define    POS_3B        0x0010        /* Third */
  16. #define    POS_SS        0x0020        /* Short */
  17. #define    POS_OF        0x0040        /* Outfield */
  18. #define    POS_DH        0x0080        /* DH */
  19.  
  20. /*
  21.  
  22. *//*    Structures        */
  23.  
  24.     /* Batter stat structure used in player stat interface. */
  25.  
  26. typedef
  27.   struct {
  28.     WORD    bs_atbat;        /* # of atbats */
  29.     WORD    bs_hits;            /* Hits */
  30.     WORD    bs_1b;            /* Singles */
  31.     UBYTE bs_2b;            /* Doubles */
  32.     UBYTE bs_3b;            /* Triples */
  33.     UBYTE bs_hr;            /* Home Runs */
  34.     UBYTE bs_bb;            /* Walks */
  35.     UBYTE bs_hpb;            /* Hit by pitch */
  36.     UBYTE bs_rbi;            /* Runs batted in */
  37.     UBYTE bs_sb;            /* Stolen bases */
  38.     UBYTE bs_cs;            /* Caught stealing */
  39.   }  PDB_BATTER;
  40.  
  41.     /* Pitcher stats used in player stat interface */
  42.  
  43. typedef
  44.   struct {
  45.     WORD    ps_outs;        /* Outs (innings * 3) */
  46.     WORD    ps_er;            /* Earned runs */
  47.     WORD    ps_bb;            /* Walks */
  48.     WORD    ps_hits;        /* Hits */
  49.     UBYTE ps_won;            /* Wins */
  50.     UBYTE ps_lost;        /* Losses */
  51.     UBYTE ps_saved;        /* Saves */
  52.   }  PDB_PITCHER;
  53.  
  54.  
  55. /* To total batters and/or pitchers, use these (note the extra big WORD entries */
  56. typedef
  57.   struct {
  58.     WORD    bs_atbat;        /* # of atbats */
  59.     WORD    bs_hits;            /* Hits */
  60.     WORD    bs_1b;            /* Singles */
  61.     WORD bs_2b;            /* Doubles */
  62.     WORD bs_3b;            /* Triples */
  63.     WORD bs_hr;            /* Home Runs */
  64.     WORD bs_bb;            /* Walks */
  65.     WORD bs_hpb;            /* Hit by pitch */
  66.     WORD bs_rbi;            /* Runs batted in */
  67.     WORD bs_sb;            /* Stolen bases */
  68.     WORD bs_cs;            /* Caught stealing */
  69.   }  PDBT_BATTER;
  70.  
  71. typedef
  72.   struct {
  73.     WORD    ps_outs;        /* Outs (innings * 3) */
  74.     WORD    ps_er;            /* Earned runs */
  75.     WORD    ps_bb;            /* Walks */
  76.     WORD    ps_hits;        /* Hits */
  77.     WORD ps_won;            /* Wins */
  78.     WORD ps_lost;        /* Losses */
  79.     WORD ps_saved;        /* Saves */
  80.   }  PDBT_PITCHER;
  81.  
  82.     /* Structure used to pass completely qualified player name */
  83.  
  84. typedef
  85.   struct {
  86.     char    pn_team[4];        /* 3-letter team abbreviation */
  87.     char    pn_lname[16];        /* Last name */
  88.     char    pn_fname[4];        /* First name */
  89.      char batter;                                /* == TRUE if batter */
  90.   }    PDB_PNAME;
  91.  
  92.   /* structure for specific data associated with each major league */
  93.   /* player put in the AVL tree. */
  94. typedef 
  95.   struct {
  96.      char status[5];                            /* Current status of player */
  97.      char date[MAX_DATE+1];                    /* Date status started */
  98.      int week;                                    /* week # status started */
  99.      BYTE zorch;                                /* -1 if not available, 0 if free agent */
  100.                                                     /* 1 if on rotise team, 2 if hidden */
  101.                                                     /*  I don't know what to call field!! */
  102.  } PDATA;
  103.  
  104. #endif    /* H_BB_PDB  */
  105.  
  106.